import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 11951
 * Date: 2025-11-03
 * Time: 14:23
 */
public class Test {
    public static void main(String[] args) {
        int[] arr = {9, 5, 2, 7,1,4};
        System.out.println("排序前的顺序:"+Arrays.toString(arr));
        Demo.bubbleSort(arr);
        System.out.println("排序后的顺序："+Arrays.toString(arr));

    }
    public static void main1(String[] args) {
        int[] array={1,2,3,4,5,6,7,8};
//        System.out.println("排序前的数组的顺序"+ Arrays.toString(array));
//        System.out.println(Demo.findKey(array,8));
        System.out.println(Demo.binarySearch(array, 5));
    }



}

